package com.qian.service.ddj.entity;

import com.yaowk.service.common.BaseEntity;
import com.yaowk.service.common.GeneratorNote;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;

/**
 * 网站配置
 * created by quziwei on 2018/2/28 0028  16:02
 */
@Entity
@ToString
@Setter
@Getter
@DynamicUpdate
@DynamicInsert
public class DdjConfig extends BaseEntity<Integer>{

    @GeneratorNote("名称")
    private String name;
    @GeneratorNote("值")
    @Column(columnDefinition = "LONGTEXT")
    private String value;
    @GeneratorNote("描述")
    private String description;
    @GeneratorNote("上级ID")
    @Column(insertable = false,updatable = false)
    private Integer parentId;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "parentId")
    private DdjConfig ddjConfig;
}
